package models;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class ConstantValuePK
{
    @Column(columnDefinition="VARCHAR(100)")
    public String key_value = "";
    @Column(columnDefinition="VARCHAR(10)")
    public String languich = "";

    public boolean equals(Object object)
    {
	if (object instanceof ConstantValuePK)
	{
	    ConstantValuePK userRoleHolderPK = (ConstantValuePK) object;
	    return key_value.equals(userRoleHolderPK.key_value)
		    && languich.equals(userRoleHolderPK.languich);
	}
	else
	{
	    return false;
	}
    }

    public int hashCode()
    {
	return (int) (key_value + languich).hashCode();
    }
}
